package com.jr.util;


import org.springframework.stereotype.Component;

import java.util.List;


public class PageHelper<T> {

    //当前页面数据
    private List<T> indexinfos;

    //当前是第几页，默认是第一页
    private int indexpage=1;

    //每页展示10条数据
    private int showcount=10;

    //总页数

    private int countpage;

    //总条数
    private int countnum;

    public PageHelper() {
    }

    public PageHelper(List<T> indexinfos, int indexpage,
                      int showcount, int countpage, int countnum) {
        this.indexinfos = indexinfos;
        this.indexpage = indexpage;
        this.showcount = showcount;
        this.countpage = countpage;
        this.countnum = countnum;
    }

    @Override
    public String toString() {
        return "PageHelper{" +
                "indexinfos=" + indexinfos +
                ", indexpage=" + indexpage +
                ", showcount=" + showcount +
                ", countpage=" + countpage +
                ", countnum=" + countnum +
                '}';
    }

    public List<T> getIndexinfos() {
        return indexinfos;
    }

    public void setIndexinfos(List<T> indexinfos) {
        this.indexinfos = indexinfos;
    }

    public int getIndexpage() {
        return indexpage;
    }

    public void setIndexpage(int indexpage) {
        this.indexpage = indexpage;
    }

    public int getShowcount() {
        return showcount;
    }

    public void setShowcount(int showcount) {
        this.showcount = showcount;
    }

    public int getCountpage() {
        return countpage;
    }

    public void setCountpage(int countpage) {
        this.countpage = countpage;
    }

    public int getCountnum() {
        return countnum;
    }

    public void setCountnum(int countnum) {
        this.countnum = countnum;
    }
}
